Skip to content

Completed API Test Suite + Order PATCH Workflow#216

Open
raghavimoningi wants to merge 1 commit intoautomationExamples:mainfrom
raghavimoningi:main
Open

Completed API Test Suite + Order PATCH Workflow#216
raghavimoningi wants to merge 1 commit intoautomationExamples:mainfrom
raghavimoningi:main

Conversation

@raghavimoningi
Copy link
Copy Markdown

Adds automated API tests for the Petstore application, including fixtures, schema validation, negative scenarios, and a full end‑to‑end workflow test for PATCH /store/order/{order_id}. This PR improves test coverage, validates core functionality, and ensures consistent behavior across pet creation, order placement, and order status updates

Evidence:
tests_log

Defect Summary:

  • Invalid status error message uses a literal placeholder ({status}) instead of the actual value.
  • POST /pets accepts incomplete or invalid payloads due to missing required‑field validation.
  • Duplicate pet ID check fails when IDs are provided as strings vs integers.
  • GET /pets/{id} returns an HTML 404 page for invalid IDs instead of a JSON error response.
  • PATCH /store/order writes the new status before validating it, causing invalid data to be stored.
  • PATCH /store/order throws a KeyError when the status field is missing in the request body.
  • POST /store/order allows requests without pet_id, resulting in misleading error messages.
  • Pets can be re‑ordered after status transitions because no duplicate‑order prevention exists.
  • findByStatus returns 200 with an empty list even when no pets match the requested status.
  • PATCH /store/order returns only a success message instead of the updated order or pet details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant